package com.xishu.entity.order;

import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * 菜品和订单的映射关系
 * 用于生成报表
 * <p>
 * 因为Mysql不支持对象保存
 */
@Entity(name = "order_item_mapping")
@Table(indexes = {@Index(columnList = "createTime")})
public class OrderItemMapping extends AbstractEntity {
    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    @ApiModelProperty(value = "菜品ID")
    private Long itemId;

    @ApiModelProperty(value = "菜品的名称")
    private String itemName;

    @ApiModelProperty(value = "菜品的中文名称")
    private String itemName_zh;

    @ApiModelProperty(value = "菜品的英文名称")
    private String itemName_en;

    @ApiModelProperty(value = "归属的餐厅公司")
    private Long companyId;

    @ApiModelProperty(value = "分店的ID")
    private Long shopId;

    @ApiModelProperty(value = "分店的名称")
    private String shopName;

    @ApiModelProperty(value = "品类的ID")
    private Long catalogId;

    @ApiModelProperty(value = "金额")
    private Double cash;

    @ApiModelProperty(value = "父订单的ID,如果本身是父订单，那么订单号也是父订单号")
    private Long parentOrderId;

    @ApiModelProperty(value = "菜的份数")
    private Integer itemCount;

    public Integer getItemCount() {
        return itemCount;
    }

    public void setItemCount(Integer itemCount) {
        this.itemCount = itemCount;
    }

    public Long getParentOrderId() {
        return parentOrderId;
    }

    public void setParentOrderId(Long parentOrderId) {
        this.parentOrderId = parentOrderId;
    }

    public String getItemName_en() {
        return itemName_en;
    }

    public void setItemName_en(String itemName_en) {
        this.itemName_en = itemName_en;
    }

    public String getItemName_zh() {
        return itemName_zh;
    }

    public void setItemName_zh(String itemName_zh) {
        this.itemName_zh = itemName_zh;
    }

    public Double getCash() {
        return cash;
    }

    public void setCash(Double cash) {
        this.cash = cash;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Long getCatalogId() {
        return catalogId;
    }

    public void setCatalogId(Long catalogId) {
        this.catalogId = catalogId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }
}
